const express=require('express');
const router=express.Router();
const {Fclass,oneClass,classId,updateClass,deleteClass,addClass}=require('../service/aritcleService.js')

router.get('/Fclass',async function(req,res,next){
let data=await Fclass();
res.send(data);
})

router.post('/oneClass',async function(req,res,next){
let data=await oneClass(req.body);
res.send(data);
})

router.post('/classId',async function(req,res,next){
  let data= await classId(req.body);
  res.send(data);
})

router.post('/updateClass',async function(req,res,next){
  let data=await updateClass(req.body);
})

router.post('/deleteClass',async function(req,res,next){
  let data=await deleteClass(req.body);
})

router.post('/addClass',async function(req,res,next){
  let data=await addClass(req.body);
})
module.exports=router;